<template>
  <el-col :span="6">
    <el-form-item label="车主信息">
      <el-select v-model="getVal" placeholder="请选择" @change="sendCode" :disabled="disabled">
        <el-option
          v-for="item in options"
          :key="item.getVal"
          :label="item.label"
          :value="item.getVal"
        ></el-option>
      </el-select>
    </el-form-item>
  </el-col>
</template>

<script>
export default {
  name: "sct_CarInfo",
  props:{
    getVal:{type:String,default:""},
    disabled:{type:Boolean,default:true}
  },
  data() {
    return {
      // options:this.getData(),
      options: [
        {
          getVal: "1",
          label: "维护车主信息"
        },
        {
          getVal: "2",
          label: "变更车主"
        }
      ]
    };
  },
  methods: {
    // getData(){
    //   let that=this;
    //   that.options=[
    //     {
    //       getVal: "1",
    //       label: "维护车主信息"
    //     },
    //     {
    //       getVal: "2",
    //       label: "变更车主"
    //     }
    //   ]
    // },
    sendCode() {
      let val = this.getVal;
      this.$emit("changeCode", val);
    }
  }
};
</script>